package com.yanqu.backendweb.bean.enums;

import com.yanqu.road.entity.enums.ConvertibleEnum;

/**
 * @author duli
 * @version 1.0
 * @date 2020/11/4 18:09
 * @Description 日志大类
 */
public enum LogCategory implements ConvertibleEnum<Integer> {

    PLAYER(0, "玩家信息"),

    MAIL(1, "邮件信息"),

    BUILDING(2, "商铺信息"),

    PATRONS(3, "门客信息"),

    VEHICLE(4, "珍兽信息"),

    TRADE_WAR(5, "商战信息"),

    RESTAURANT(6, "酒楼信息"),

    REWARD(7, "奖励信息"),

    BEAUTY(8, "美女信息"),

    MARRIAGE_CHILD(9, "亲家子嗣信息"),

    RELOCATION(10, "乔迁风云信息"),

    UNION(11, "商会信息"),

    HUNT(12, "狩猎信息"),

    COMMON_ACTIVITY(13, "万能活动"),

    WORSHIP(14, "参拜信息"),

    RISERANK(15, "冲榜排名"),

    CHARITABLE(16, "行善信息"),

    SALTWORKS_TYCOON(17, "盐场大亨信息");


    private int intValue;

    private String name;

    LogCategory(int value, String name) {
        intValue = value;
        this.name = name;
    }

    @Override
    public Integer getIntValue() {
        return intValue;
    }

    @Override
    public String getName() {
        return name;
    }

    public static LogCategory forValue(int value) {
        for (LogCategory type : LogCategory.values()) {
            if (type.intValue == value) {
                return type;
            }
        }
        return null;
    }
}

